# !/usr/bin/python3
# -*- coding:utf-8 -*-
"""
@author: JHC000abc@gmail.com
@file: config.py
@time: 2024/10/23 18:47 
@desc: 

"""
import platform

new_system = platform.system().title()
if new_system in ("Darwin", "Windows"):
    DEBUG = True
    DB_CONFIG = {
        "username": "root",
        "password": "123456",
        "host": "127.0.0.1",
        "port": 3306,
        "db": "net",
    }

elif new_system == "Linux":
    DEBUG = False
    DB_CONFIG = {
        "username": "net",
        "password": "net_123456",
        "host": "127.0.0.1",
        "port": 3306,
        "db": "net",
    }
else:
    print(f"未知操作系统:{new_system}")

FLASK_CONFIG = {
    "host": "0.0.0.0",
    "port": 5000,
}
REDIS_CONF = {
    "host": "localhost",
    "port": 6379,
    "db": 3,
}

SQLPAGESIZE = 5

sk = "fb565ca799a431a5a4102d10ff84cb3661bb0cf0f415e7"
ak = "8cc389ad42ced61fa4dcb3c635a4f5568697526549ed5dee3"

# redis 记录ip 单位时间最大使用次数
ACCESS_LIMIT = 30
# redis 记录ip 使用次数更新时长/s
TIME_WINDOW = 60
# 任务有效时长
TASKS_TIMEOUT = 12 * 60 * 60
